<?php
require_once(ROOTDIR."/include/class.rcon.php");
require_once(ROOTDIR."/include/database/class.ServerQueries.php");

$serverQueries = new ServerQueries();

$servers = $serverQueries->getServers();

// Cycle through each server
foreach($servers as $server) {
  ?>
  <h3 id="server:<?=$server->getId()?>">Updating Admins List for <?=$server->getName()?> <img src="images/wait.gif"/></h3>
  <?php
}
?>
<h5>Note: Admin list will continue to upload if you navigate off this page.  However, reloading this page or navigating
back too quickly can have odd results and require a new upload.</h5>
<script src="javascript/ajax.js" language="javascript" type="text/javascript"></script>
<script language="Javascript" type="text/javascript">
<?php
foreach($servers as $server) {
?>
  uploadAdmins(<?=$server->getId()?>);
<?php
}
?>
</script>
